package com.question.business.role.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.question.business.role.entity.Role;
import com.question.business.role.model.ao.RoleDropDownAO;
import com.question.business.role.model.ao.RolePageAO;
import com.question.business.role.model.vo.RoleDropDownVO;
import com.question.business.role.model.vo.RoleVO;
import com.question.common.annotation.DataConvert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 角色Mapper接口
 *
 * @author star
 * @since 2023-09-13
 */
@Mapper
public interface RoleMapper extends BaseMapper<Role> {
    /**
     * 角色分页查询
     *
     * @param page 分页参数
     * @param ao   请求参数
     * @return Page<RoleVO> 响应参数
     */
    @DataConvert
    Page<RoleVO> queryRolePage(Page<RoleVO> page, @Param("ao") RolePageAO ao);

    /**
     * 角色下拉列表查询
     *
     * @param ao 请求参数
     * @return List<RoleDropDownVO> 响应参数
     */
    List<RoleDropDownVO> queryRoleDropDown(RoleDropDownAO ao);
}